/**
 * 
 */
package org.codesketch.controller.dao;

import java.util.List;
import java.util.Set;

import org.codesketch.controller.domain.Task;

/**
 * Defines the archetype methods for accessing the task 
 * repository.
 * @author Quirno Brizi
 *
 */
public interface TaskRepository {
	/**
	 * Insert a task into the {@link Task} repository.
	 * @param task the {@link Task} to have to store.
	 */
	void insert(final Task task);
	/**
	 * Save the provided task into the repository.
	 * @param task the task to save.
	 */
	void save(final Task task);
	/**
	 * Lookup the task repository for the {@link Task} identified 
	 * by the given identifier.
	 * @param id the task identifier
	 * @return the {@link Task} identified by the provided identifier or 
	 * null if it doesn't exists.
	 */
	Task find(final Long id);
	/**
	 * Retrieve all the {@link Task} stored on the repository.
	 * @return a {@link Set} of {@link Task}
	 */
	List<Task> findAll();
}
